package com.zt.controller.servlet;

import com.zt.business.service.ModuleService;
import com.zt.business.vo.ModuleMenu;
import com.zt.business.vo.ResponseData;
import com.zt.controller.annotation.RequestMethod;
import lombok.extern.log4j.Log4j2;

import javax.servlet.annotation.WebServlet;
import java.util.List;

@Log4j2
@WebServlet("/sys/module/*")
public class ModuleServlet extends BaseServlet {

    private ModuleService moduleService = new ModuleService();
    @RequestMethod("/sys/module/menu")
    public void menu() throws Exception{
        List<ModuleMenu> menus = moduleService.initMenu();
        ResponseData data =ResponseData.responseSuccessData("获取菜单成功",menus);
        responseAjax(data);
    };

}
